package com.lvcoding.customize.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @author wuyanshen
 * @description 描述
 * @date 2022-02-21 上午11:36
 */
@RequestMapping("user")
@RestController
public class UserController {

    @GetMapping("info")
    public String info(Principal principal) {
        return principal.getName();
    }
}
